
#include "stack.h"



void StackTest()
{
	ST s;
	StackInit(&s);
	StackPush(&s, 1);
	StackPush(&s, 12);
	StackPush(&s, 31);
	StackPush(&s, 22);

	StackPrint(&s);

	int size = Stacksize(&s);
	printf("%d\n", size);

	StackPop(&s);
	StackPop(&s);
	StackPop(&s);
	StackPop(&s);
	//StackPop(&s);

	StackPrint(&s);


	STDataType* p = StackTop(&s);
	printf("%p %p\n", p, s.p );



	StackDistroy(&s);
}



int main()
{
	StackTest();

	return 0;
}